<meta charset="utf-8"/>
<script>
var date=prompt("请输入日期：");
var i=date.indexOf("年");
function change(s){

var month=date.substring(0,i-4);
var year=date.substring(i-4);
return year+month;
}
date=change(date);
document.write(""+date+"");
</script>